import { baseHttpClient } from "@/request/httpClient";
const getDXFList = function () {
  return baseHttpClient.get("/dxf/list");
};
const saveDXF = function (data) {
  return baseHttpClient.post("/dxf/save", data);
};
const deleteDXF = function (ids) {
  return baseHttpClient.delete(`/dxf/delete/${ids}`);
};

const getFloors = function () {
  return baseHttpClient.get("/dxf/floor/list");
};
const saveFloor = function (data) {
  return baseHttpClient.post("/dxf/floor/setting", data);
};

const getRooms = function (floorId) {
  return baseHttpClient.get(`/dxf/room/list/${floorId}`);
};
const saveRoom = function (data) {
  return baseHttpClient.post("/dxf/saveRoom", data);
};
const saveRoomByFloorId = function (data, floorId) {
  return baseHttpClient.post(`/dxf/saveRoomBatch/${floorId}`, data);
};
const deleteRooms = function (ids) {
  return baseHttpClient.delete(`/dxf/room/delete/${ids}`);
};
const dealRooms = function (data) {
  return baseHttpClient.post("/dxf/room/deal", data);
};

export {
  getDXFList,
  saveDXF,
  deleteDXF,
  dealRooms,
  getFloors,
  saveFloor,
  getRooms,
  saveRoom,
  saveRoomByFloorId,
  deleteRooms,
};
